<?php

namespace App\Http\Controllers\Admin\Login\Api;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\AdminUsers;

class loginApi extends Controller
{
    public function login($name, $pwd)
    {
    	$res = AdminUsers::select()->where('uname', $name)->first();
    	if (!$res) {
    		$tis = '账号不存在';
    		return $tis;
    		exit;
    	}

    	if(md5(md5($pwd))!=$res['pass']){
    		$tis = '密码错误';
    		return $tis;
    		exit;	
    	}

    }
}
